/*
  Copyright © 2010  Rodrigo Peixoto

      This file is part of Touché.

      Touché is free software: you can redistribute it and/or modify
      it under the terms of the GNU Lesser General Public License as published
      by the Free Software Foundation, either version 3 of the License, or
      (at your option) any later version.

      This program is distributed in the hope that it will be useful,
      but WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      GNU Lesser General Public License for more details.

      You should have received a copy of the GNU Lesser General Public License
      along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */

#ifndef CHANNEL_H
#define CHANNEL_H
#include <QPair>
#include <QStringList>

class Channel
{
    Q_PROPERTY(QString name READ name WRITE setName)
    Q_PROPERTY(QString password READ password WRITE setPassword)

public:
    Channel(QString name, QString password);
    Channel(QPair<QString, QString> nameAndPassword);
    void addUser(QString userBarejid);
    void removeUser(QString bareJid);
    void setPassword(QString);
    void setName(QString);
    QString name();
    QString password();
    QStringList usersBarejid();
    bool hasUser(QString bareJid);
    bool isEmpty();
    //bool isInChannel(QString userBarejid);
private:
    QString m_name;
    QString m_password;
    QStringList m_usersBarejid;

};

#endif // CHANNEL_H
